package com.gmail.avenderov.domain;

import com.google.common.base.Objects;

public class Message {

    private Long id;

    private String text;

    private Message nextMessage;

    public Message() {
    }

    public Message(String text) {
        this.text = text;
    }

    public Long getId() {
        return id;
    }

    private void setId(Long id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public Message getNextMessage() {
        return nextMessage;
    }

    public void setNextMessage(Message nextMessage) {
        this.nextMessage = nextMessage;
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(getClass().getName()).
                add("id", id).
                add("text", text).
                add("nextMessage", nextMessage).toString();
    }
}
